<template>
    <div class="box">
      <el-button type="primary" @click="goHome">首页(点击返回首页)</el-button>
      <img src="../../assets/images/error_images/404.png" alt="">
      
    </div>
  </template>
  <script setup lang='ts' name='index'>
  import { onMounted } from 'vue';
import { useRouter } from 'vue-router';
  let $router = useRouter()
  const goHome = () => {
    $router.push('/home')
  }
  onMounted(() => {
    setTimeout(() => {
      $router.push('/home')
    },2000)
  })
  </script>
  
  
  <style scoped>
  .box{
    width: 100vw;
    height: 100vh;
    background-color: yellowgreen;
    display: flex;
    justify-content: center;
    img{
      width: 800px;
      height: 400px;
      margin-left: 20%;
    }
  }
  </style>